package cn.zhp.mapper;

import cn.zhp.entity.Transfer;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface TransferMapper extends Mapper<Transfer> {

    @Select("SELECT " +
            "    tr.*, " +
            "    su.NAME, " +
            "    su.phone  " +
            "FROM " +
            "    transfer tr, " +
            "    sys_user su  " +
            "WHERE " +
            "    tr.del_flag = 0  " +
            "    AND tr.work_order_id = #{oid}  " +
            "    AND tr.oprate_user_id = su.id  " +
            "ORDER BY " +
            "    tr.create_date DESC ")
    List<Transfer> selectByOid(long oid);
}